Skip to content

fix: resolve failing tests and type errors across monorepo - #290

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-919-1794567152
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-919-1794567152

Conversation

@stooit

@stooit stooit commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

bun test && tsc --noEmit now passes: 13 tests pass, 0 fail, and tsc reports no errors.

  • bunfig.toml: Bun ignores the environment = "happy-dom" setting. Replaced it with a preload of the existing packages/ui/test/setup.ts (happy-dom global registrator), so document exists in the UI tests.
  • apps/web/src/lib/api.ts: imports the renamed useDebounce instead of the removed useThrottle.
  • Button.tsx: now forwards aria-label to the button. Icon-only buttons without a label fall back to "" and log a console.warn.
  • DataTable.tsx: the sort toggle uses a functional setSortDir update, which fixes the stale closure.
  • date.ts: formatDate now produces en-AU D/MM/YYYY with no leading zero on the day, as the test expects (1/03/2024).
  • tsconfig.json: added "types": ["bun-types"] (already a devDependency) so tsc can resolve bun:test.

Assumptions and review notes

  • No test files were changed and no dependencies were added.
  • Button: the empty aria-label fallback exists only because a test requires a non-null attribute on an icon-only button that has no label. An empty label gives no accessible name, so the WCAG 4.1.2 problem is still there. The proper fix is to make aria-label required for iconOnly buttons (a discriminated union) and update that test. That falls outside this task's constraints.
  • formatDate: the output changes for days 1–9 (01/… becomes 1/…). The only caller in the repo is the re-export in apps/web.
  • DataTable: the DataTable tests already passed once the DOM environment was fixed. The functional update is kept as a correctness fix for the stale closure the task describes.
  • Test setup: the happy-dom preload now runs for every package, so happy-dom also replaces fetch in the utils and web tests.

@stooit stooit changed the title fix: resolve failing tests and type errors across ui, utils and web fix: resolve failing tests and type errors across monorepo Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant